﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

public partial class LookApplyer : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (null == Session["com"])
        {
            Label1.Text = "<script>alert('请登录！');window.location.href='ComDefault.aspx';</script>";
           
        }
    }
    protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int jaid = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value);
        SqlDataSource2.DeleteCommand = "delete from tb_jobapply where jaid="+jaid+"";
    }
    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        GridView1.PageIndex = e.NewPageIndex;
        SqlDataSource2.SelectCommand = "SELECT tb_jobapply.jaid, tb_jobapply.pid, tb_jobapply.cwid, tb_jobapply.jatime, tb_jobapply.islook, tb_person.pname, tb_person.psex, tb_person.page, tb_person.ptel, tb_person.pemail, tb_person.pknowledge, tb_person.pschool FROM tb_jobapply INNER JOIN tb_person ON tb_jobapply.pid = tb_person.pid WHERE (tb_jobapply.cwid = @cwid)";
    }
}
